{@
	$ds_readed = $ci['readed_count']->display == 'Y';
	$ds_voted = $ci['voted_count']->display == 'Y';
	$ds_blamed = $ci['blamed_count']->display == 'Y';
	$ds_status = $ci['custom_status']->display == 'Y';

	$ds_nick = $ci['nick_name']->display == 'Y';
	$ds_user =	$ci['user_name']->display == 'Y';

	$ds_regdate = $ci['regdate']->display == 'Y';
	$ds_update = $ci['last_update']->display == 'Y';
	$ds_updater = $ci['last_updater']->display == 'Y';
	$ds_update && $ds_updater ? $ci['last_update']->display = 'N' : 0;

	$ci['content']->display = 'N';
	$ci['comment']->display = 'N';
	$ci['thumbnail']->display = 'N';
	$ci['tag']->display = 'N';

	$mi->star_style!='N' ? $ci['blamed_count']->display = 'N' : 0;
	$mi->star_style!='N' && $ds_voted ? $ci['readed_count']->display = 'N' : 0;

	$lang->short_readed_count ? $ci['readed_count']->name = $lang->short_readed_count : 0;
	$lang->short_blamed_count ? $ci['blamed_count']->name = $lang->short_blamed_count : 0;
	$lang->short_voted_count ? $ci['voted_count']->name = $lang->short_voted_count : 0;
	$mi->star_style!='N' ? $ci['voted_count']->name = $lang->star_column : 0;

	$colcnt = $sotcnt = 0;
	$sclms = array();
	$is_notice_widget = !$is_doc;
	$a_lsttp = array('notice'=>&$notice_list,'best'=>&$best_list);
}

<block loop="$ci => $key,$val" cond="$val->display=='Y'">
	{@
		$colcnt += $val->idx<0?1:0;
		$sclms[$key] = $val;
	}
</block>

<include cond="$is_notice_widget && (count($notice_list) || count($best_list))" target="_etc.noticewidget.html" />

<div cond="$mi->display_list_header!='N'" id="siHrm" class="clearBar">
	<ul class="scFrm">
		<li class="scElps fl"><strong>{$mi->blog_caption}</strong></li>
		<li class="scHaDCnts">
			<!--@if($mi->display_document_count!='N')-->
			<em>Today</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd"))}</strong>,
			<em>Yesterday</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd",strtotime("-1 day", time())))}</strong>,
			<em>Total</em> <strong>{$total_count}</strong>
			<!--@else-->
			<span>&nbsp;</span>
			<!--@endif-->
		</li>
	</ul>
</div>
{@
	$document_srl?$document_list=array($oDocument):0;
	$ds_voteup = strpos($mi->use_vote, 'up')!==false;
	$ds_votedown = strpos($mi->use_vote, 'down')!==false;
	$ds_declare = strpos($mi->use_vote, 'declare')!==false;
	$adm_id = $ds_declare ? $oThis->getAdminId() : array();
}
<a name="document"></a>
<div cond="count($document_list)" id="siDoc" class="book">
<!-- /LIST -->
	<div loop="$document_list => $no,$document" class="scItem clearBar"><a name="document_{$document->document_srl}" data-scroll="true"|cond="$document_no&&$document_no==$document->document_srl"></a>
		{@
			$oDocument = &$document;
			$doc_srl = $oDocument->document_srl;

			$is_granted = $grant->view && $oDocument->isGranted();
			$is_secret = $oDocument->isSecret();
			$is_locked = $is_cklok?$oThis->isLocked($doc_srl):0;
			$is_blind = $mi->use_blind=='Y'?$oThis->isBlind($doc_srl):0;
			$is_restrict = $mi->use_restrict_view!='N'&&!$is_granted&&!$is_secret?$oThis->isRestrict($doc_srl):0;

			$exks = ((!$is_secret || $is_granted) && $oDocument->isExtraVarsExists()) ? $oDocument->getExtraVars() : array();
			$tags = (!$is_secret || $is_granted) ? $oDocument->get('tag_list') : array();

			$un_extra = ($is_rtrpt||$ao_ppang||$ds_mtlng)?$oDocument->get('extra_vars'):null;
			$un_extra = is_string($un_extra)?unserialize($un_extra):$un_extra;
		}

		<strong class="scRibbon">
			<span class="caption scElps" data-active="true"|cond="$is_elips">
				<a href="{$oDocument->getPermanentUrl()}">{$is_blind?$lang->msg_is_blind:$oDocument->getTitle()}</a>
				<span class="fr">
					{$oDocument->printExtraImages(60*60*$mi->duration_new)}<img class="scIcoSet world" src="img/common/blank.gif" alt="multilingual" title="multilingual" cond="$ds_mtlng&&count($un_extra->beluxe->langs)" />
					<block cond="$ao_ppang&&$un_extra->ppang&&$un_extra->ppang->d->p>0">
						{@$ao_pppt = sprintf($lang->bonus_pang_pang, $un_extra->ppang->d->p)}
						<img class="scIcoSet coin" src="img/common/blank.gif" title="{$ao_pppt}" alt="{$ao_pppt}" />
					</block>
					{@ $cate = $is_cts?$cts[$oDocument->get('category_srl')]:0 }
					<em cond="$cate" title="{htmlspecialchars($cate->description)}" style="color:{$cate->color}"|cond="$cate->color">
						[{$cate->title}]
					</em>
				</span>
			</span>
		</strong>
		<div class="scConfrm clearBar">
			<ul class="scFrm mbAfrm">
				<li class="clearBar">
					<span class="fl">
						<img cond="$is_secret" class="scIcoSet secret" src="img/common/blank.gif" />
						<block cond="$ds_nick||$ds_user">
							{@
								$mbsl = $oDocument->get('member_srl');
								$home = $oDocument->get('homepage');
								$nick = (!$mbsl||$ds_nick)?cut_str($oDocument->getNickName(), $mi->nickname_length):'';
								$nick .= ($mbsl&&$ds_user)?($nick?' (':'').cut_str($oDocument->getUserName(), $mi->nickname_length).($nick?')':''):'';
							}
							<i cond="!$mbsl && !$home">{$nick}</i>
							<span cond="$mbsl" class="scHLink member_{$mbsl}">{$nick}</span>
							<i cond="!$mbsl && $home" class="scHLink" data-href="{$home}">{$nick}</i>
						</block>
						<span cond="$mi->display_ip_address == 'Y'||($mi->display_ip_address == 'A' && $grant->manager)" class="ipAddress">(IP: {$oDocument->getIpaddress()})</span>
					</span>
					<span class="scCntIfo fr">
						<block cond="$mi->star_style=='N'">
							<block cond="$ds_readed">
								<span>{$lang->readed_count}:</span>
								<span>{$oDocument->get('readed_count')},</span>
							</block>
							<block cond="$ds_voted || $ds_blamed">
								<span>{$lang->voted_count}:</span>
								<span>{$oDocument->get('voted_count').'/'.$oDocument->get('blamed_count')},</span>
							</block>
						</block>
						<span cond="$ds_update" title="{$lang->last_update}">{zdate($oDocument->get('last_update'))}</span><span cond="$ds_regdate&&$ds_update" title="{$lang->regdate}">({$oDocument->getRegdate('Y.m.d')})</span>
						<span cond="$ds_regdate&&!$ds_update" title="{$lang->regdate}">{$oDocument->getRegdate()}</span>
						<block cond="$mi->star_style!='N' && ($ds_voted || $ds_blamed || $ds_readed)">
							{@
								$votedp = (int)$oDocument->get('voted_count');
								$blamedp = (int)$oDocument->get('blamed_count');
								$totalp = $votedp?(($votedp / ($votedp + abs($blamedp)) * 100) * 0.5):0;
							}
							<span cond="$ds_readed" class="scRdStar color{$mi->star_style}" title="{$lang->readed_count}">{$oDocument->get('readed_count')}</span>
							<span cond="$ds_voted || $ds_blamed" class="scVtStar color{$mi->star_style}" title="{$lang->voted_count}: {$votedp.'/'.$blamedp}"><em style="width:{$totalp}px"></em></span>
						</block>
						<span cond="$ds_status" class="custom_status_{(int)$oDocument->get('is_notice')}">[{$cstus[(int)$oDocument->get('is_notice')]}]</span>
					</span>
				</li>
				<li cond="!$is_blind&&count($exks)" loop="$exks=>$key,$val" cond="$sclms['extra_vars'.$val->idx]" class="scVext clearBar">
					<label>{$val->name}</label>: <span>{$val->getValueHTML()}</span>
				</li>
			</ul>
			<span cond="$grant->manager" class="scCheck"><input type="checkbox" name="cart" value="{$doc_srl}" onclick="doAddDocumentCart(this)" checked="checked"|cond="$oDocument->isCarted()" /></span>

			<div class="scDocCon clearBar {$is_blind?'blind':($is_secret?'secret':'')}">
				<div cond="$ds_mtlng&&count($un_extra->beluxe->langs)" class="scVlng clearBar">
					<a loop="$un_extra->beluxe->langs => $vlnc" href="#" onclick="doChangeLangType('{$vlnc}');return false;" class="{$vlnc}"><strong>{$lang_supported[$vlnc]}</strong></a>
				</div>

				<form cond="$is_secret && !$is_granted" ruleset="checkPassword" action="./" method="post" class="conSecret">
				<input type="hidden" name="document_srl" value="{$doc_srl}" />
				<input type="hidden" name="act" value="procBoardVerificationPassword" />
				<div class="btnArea">
					<span class="scBtn black"><input type="password" name="password" /></span>
					<span class="scBtn black"><input type="submit" value="{$lang->cmd_input}" /></span>
				</div>
				</form>

				<!--@if($is_restrict)-->
					<div id="restricted_view">
						<div class="msgArea">
							{sprintf(Context::getLang('msg_restricted_view'), 100)}
							<br />
							{Context::getLang($mi->use_restrict_view == 'P' ? 'msg_required_point' : 'msg_required_comment')}
						</div>
						{$oDocument->getSummary(100)}
						<div cond="$mi->use_restrict_view == 'P'" class="btnArea">
							<span class="btn">
								<a href="#" onclick="doCallModuleAction('beluxe','procBeluxePayPoint','{$doc_srl}');return false">
									{sprintf(Context::getLang('msg_point_is_used'), $un_extra->beluxe->use_point?$un_extra->beluxe->use_point:'0')}
								</a>
							</span>
						</div>
					</div>
				<!--@else-->
					{@ (!$is_secret||$is_granted) ? $oDocument->updateReadedCount() : 0}
					{$is_blind?$lang->msg_is_blind:$oDocument->getContent(false)}
				<!--@endif-->
			</div>

			<include cond="!$not_content&&!$is_blind&&!$is_secret&&$mi->use_history&&$mi->use_history!='N'" target="_etc.histories.html" />

			<div class="scEditBtn clearBar">
				<block cond="$is_logged">
					<span cond="$ds_voteup||$ds_votedown||$ds_declare" class="scVoteArea fl">
						<span cond="$ds_voteup||$ds_votedown" class="scBtn small group"><a cond="$ds_voteup" href="#recommend" data-type="document" data-srl="{$doc_srl}" accesskey="z"><em class="vote">{$lang->short_voted_count}</em><em class="cnt">{$oDocument->get('voted_count')}</em></a><a cond="$ds_votedown" href="#not_recommend" data-type="document" data-srl="{$doc_srl}" accesskey="x"><em class="blame">{$lang->short_blamed_count}</em><em class="cnt">{$oDocument->get('blamed_count')}</em></a></span>
						<span cond="$ds_declare" class="scBtn small group"><a href="#declare" data-type="document" data-srl="{$doc_srl}" data-rec="{count($adm_id)?$adm_id[0]->member_srl:$oDocument->get('member_srl')}"><em class="declare">{$lang->cmd_declare}</em></a></span>
					</span>
				</block>
				<span cond="!$is_locked && $oDocument->isEditable()" class="fr">
					<a href="{$us_modal?'#siModalWin':$oEntry->getUrl('act','dispBoardWrite','document_srl',$doc_srl,'document_no','')}" class="modalAnchor"|cond="$us_modal" data-mode="update">{$lang->cmd_modify}</a>
					<a href="{$us_modal?'#siModalWin':$oEntry->getUrl('act','dispBoardDelete','document_srl',$doc_srl,'document_no','')}" class="modalAnchor"|cond="$us_modal" data-mode="delete">{$lang->cmd_delete}</a>
				</span>
			</div>

			<div cond="$tag_cnt = count($tags)" class="tags">
				<block loop="$i=0;$i<$tag_cnt;$i++"> {@ $tag = $tags[$i]}
					<span cond="$i">, </span><a href="{$oEntry->getUrl('','mid',$mid,'search_target','tag','search_keyword',$tag,'document_srl','')}" class="tag" rel="tag">{htmlspecialchars($tag)}</a>
				</block>
			</div>

			<div class="trbAcmt clearBar">
				<!-- TRACKBACK -->
				<div cond="$oDocument->allowTrackback() || $oDocument->getTrackbackcount()" id="tbk_area"><include target="_viw.trackback.html" /></div>
				<!-- /TRACKBACK -->
				<!-- COMMENT -->
				<div cond="$oDocument->allowComment() || $oDocument->getCommentcount()" id="cmt_area"><include target="_viw.comment.html" /></div>
				<!-- /COMMENT -->
			</div>
		</div>

	</div>
<!-- /LIST -->
</div>
<div cond="!count($document_list)" class="scNoDocs"><div>{$lang->no_documents}</div></div>